package com.ruoyi.back.service

import com.baomidou.mybatisplus.extension.service.IService
import com.ruoyi.back.domain.UserMember
import com.ruoyi.back.enums.UserTypeEnum
import java.util.Date

interface UserMemberService : IService<UserMember> {


    /**
     * 通过用户id获取用户会员详情
     */
    fun getUserMemberByUserId(userId: Long): UserMember?

    /**
     * 移除指定用户会员
     */
    fun removeUserMember(userId: Long): Boolean


    /**
     * 添加用户会员
     */
    fun addUserMember(beginDate: Date, expireData: Date, userId: Long)

    /**
     * 用户会员类型
     */
    fun userMemberType(userId: Long): UserTypeEnum
}